]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Punt the geometry-fizzling-out logic here
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 11 Sep 2013 14:41:54 +0000 (10:41 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 30 Oct 2013 17:17:38 +0000 (13:17 -0400)
js/ui/workspace.js
js/ui/workspacesView.js

index 7bd153bee26510e2abb045509683f43770b867a7..ee3b636f5114c1d2817e3f1065a66de73d94a099 100644 (file)
@@ -892,6 +892,19 @@ function padArea(area, padding) {
     };
 }
 
+function rectEqual(one, two) {
+    if (one == two)
+        return true;
+
+    if (!one || !two)
+        return false;
+
+    return (one.x == two.x &&
+            one.y == two.y &&
+            one.width == two.width &&
+            one.height == two.height);
+}
+
 /**
  * @metaWorkspace: a #Meta.Workspace, or null
  */
@@ -967,11 +980,17 @@ const Workspace = new Lang.Class({
     },
 
     setFullGeometry: function(geom) {
+        if (rectEqual(this._fullGeometry, geom))
+            return;
+
         this._fullGeometry = geom;
         this._recalculateWindowPositions(WindowPositionFlags.NONE);
     },
 
     setActualGeometry: function(geom) {
+        if (rectEqual(this._actualGeometry, geom))
+            return;
+
         this._actualGeometry = geom;
 
         if (this._actualGeometryLater)
index d364de6f9e6263ac769235b90b4d009a8eb770bd..085d16223fb095abde107d49ebfca9d4db220d90 100644 (file)
@@ -23,19 +23,6 @@ const MAX_WORKSPACES = 16;
 
 const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
 
-function rectEqual(one, two) {
-    if (one == two)
-        return true;
-
-    if (!one || !two)
-        return false;
-
-    return (one.x == two.x &&
-            one.y == two.y &&
-            one.width == two.width &&
-            one.height == two.height);
-}
-
 const WorkspacesView = new Lang.Class({
     Name: 'WorkspacesView',
 
@@ -140,9 +127,6 @@ const WorkspacesView = new Lang.Class({
     },
 
     setFullGeometry: function(geom) {
-        if (rectEqual(this._fullGeometry, geom))
-            return;
-
         this._fullGeometry = geom;
 
         for (let i = 0; i < this._workspaces.length; i++)
@@ -150,9 +134,6 @@ const WorkspacesView = new Lang.Class({
     },
 
     setActualGeometry: function(geom) {
-        if (rectEqual(this._actualGeometry, geom))
-            return;
-
         this._actualGeometry = geom;
 
         for (let i = 0; i < this._workspaces.length; i++)